import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import Login from '../views/Login'
import FolderPage from '../views/FolderPage'
import FileDetails from '../views/file_details/FileDetails'
import Colletions from '../views/Colletions'
import Groups from '../views/Groups'
import Database from '../views/Database/Database'
import DatabaseDetails from '../views/Database/DatabaseDetails'
import Lian from '../views/Lian'
import Home from '../views/Home'
// import VideoConfrencingPage from '../views/video_confrencing/VideoConfrencingPage'
// import ConfrencingList from '../views/video_confrencing/ConfrencingList.vue'
// import CreatedConfrencingList from '../views/video_confrencing/CreatedConfrencingList.vue'
// import CreatConfrencing from '../views/video_confrencing/CreatConfrencing.vue'
import ConfigurationPage from "../views/ConfigurationPage";
import Register from "../views/Register";
import Share from "../views/file_details/Share";
import videoPlay from  '../components/videoPlay'
import mp4Play from "../components/mp4Play";
import forgetPwd from "../views/forgetPwd";

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/HelloWorld',
      name: 'HelloWorld',
      component: HelloWorld,
      meta: {
        requireAuth: true // 添加该字段，表示进入这个路由是需要登录的
      }
    },
    {
      path: '/login',
      component: Login,
      name: '',
      hidden: true,
    },
    {
      path: '/Register',
      component: Register,
      name: 'Register',
      hidden: true,
      meta: {
        requireAuth: false // 添加该字段，表示进入这个路由是不需要登录的
      }
    },
    {
      path: '/forgetPwd',
      component: forgetPwd,
      name: 'forgetPwd',
      hidden: true,
      meta: {
        requireAuth: false // 添加该字段，表示进入这个路由是不需要登录的
      }
    },
    {
      path: '/share',
      component: Share,
      name: 'Share',
      hidden: true,
      meta: {
        requireAuth: false // 添加该字段，表示进入这个路由是不需要登录的
      }
    },
    {
      path: '/videoPlay',
      component: videoPlay,
      name: 'videoPlay',
      hidden: true,
      meta: {
        requireAuth: false // 添加该字段，表示进入这个路由是不需要登录的
      }
    },
    {
      path: '/mp4Play',
      component: mp4Play,
      name: 'mp4Play',
      hidden: true,
      meta: {
        requireAuth: false // 添加该字段，表示进入这个路由是不需要登录的
      }
    },
    {
      path: '/',
      name: 'Home',
      component: Home,
      meta: {
        requireAuth: true // 添加该字段，表示进入这个路由是需要登录的
      },
      children: [
        {
          path: '/FolderPage', icon: 'fa-folder', component: FolderPage, name: '文件',blursrc:'/static/indexitem/file-blur.png',focussrc:'/static/indexitem/file-focus.png',

          children: [
            { path: '/FolderPage/Colletions', component: Colletions, name: '我的收藏', hidden: true },
            // {path: '/FolderPage/like', component: Like, name: '我的关注', hidden: true},
            // {path: '/MyFiles', component: MyFiles, name: '我的文档', hidden: true},
            // {path: '/ShareFiles', component: ShareFiles, name: '同事文档', hidden: true},
            { path: '/FolderPage/FileDetails', component: FileDetails, name: '文件详情', hidden: true },
          ]
        },
        { path: '/Groups', icon: 'fa-users', component: Groups, name: '群组', blursrc:'/static/indexitem/qunzu-blur.png',focussrc:'/static/indexitem/qunzu-focus.png'},
        { path: '/ConfigurationPage', icon: 'fa-cog', component: ConfigurationPage, name: '配置',meta: {
            isAdmin: true // 添加该字段，表示进入这个路由需要管理权限
          },blursrc:'/static/indexitem/config-blur.png',focussrc:'/static/indexitem/config-focus.png',
        },
        {
          path: '/Database', icon: 'fa-files-o', component: Database, name: '资料库', meta: {
            isAdmin: true // 添加该字段，表示进入这个路由需要管理权限
          },blursrc:'/static/indexitem/ziliaoku-blur.png',focussrc:'/static/indexitem/ziliaoku-focus.png',
          children: [
            {path:'/Database/DatabaseDetails',component:DatabaseDetails,name:'资料详情',hidden:true}
          ]
        },
        {
          path: '/Lian', icon: 'fa-video-camera', component: Lian, name: '链通', meta: {
            isAdmin: true // 添加该字段，表示进入这个路由需要管理权限
          },blursrc:'/static/indexitem/lian-blur.png',focussrc:'/static/indexitem/lian-focus.png'
          // children: [
          //   {path:'/Database/DatabaseDetails',component:DatabaseDetails,name:'资料详情',hidden:true}
          // ]
        },
        // {
        //   path: '/VideoConfrencingPage', icon: 'fa-video-camera', component: VideoConfrencingPage, name: '会议',blursrc:'/static/indexitem/huiyishi-blur.png',focussrc:'/static/indexitem/huiyishi-focus.png',
        //   children: [
        //     { path: '/VideoConfrencingPage/ConfrencingList', component: ConfrencingList, name: '会议列表' },
        //     { path: '/VideoConfrencingPage/CreatConfrencing', component: CreatConfrencing, name: '安排会议' },
        //     { path: '/VideoConfrencingPage/CreatedConfrencingList', component: CreatedConfrencingList, name: '我的会议' }
        //   ]
        // },
      ]
    }
  ],
})
